﻿using UnityEngine;

namespace DTFramework
{
    [DisallowMultipleComponent]
    [AddComponentMenu("DTFramework/GameEntry")]
    public partial class GameEntry : MonoBehaviour
    {
        void Start()
        {
            InitBuiltinComponents();
            InitCustomComponents();
            DontDestroyOnLoad(this);
        }
        /// <summary>
        /// 游戏入口 
        /// </summary>
        public static void ApplicationQuit()
        {
#if UNITY_EDITOR
            UnityEditor.EditorApplication.isPlaying = false;
#else
            Application.Quit();
#endif
        }
    }
}
